#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
@File        :   剑指Offer 05.替换空格.py    
@Contact     :   lhouctcs@163.com
@License     :   MIT
@Time        :   2023/2/8 14:57
@Author      :   lhou 
@Version     :   0.1.0
@Description :
"""


# import lib
class Solution:
    def replaceSpace(self, s: str) -> str:
        newS = ""
        for i in s:
            if i == " ":
                newS += "%20"
            else:
                newS += i
        return newS
